//  This is a test file, Don't fuck with it

#include <iostream>
#include <command.h>
#include <input_state.h>
#include <rover_state.h>

int testCommand(void);
int testInputState(void);
int testRoverState(void);

int main(int argc, char **argv){
  int input = -1;

  printf("Enter id of needed verify test.\n");
  printf(" 0 : InputState.\n");
  printf(" 1 : RoverState.\n");
  printf(" 2 : Command.\n");
  printf(" default: All.\n");
  printf("id: ");
  
  std::cin >> input;

  printf("Recieved the id of: %d\n", input);

  printf("//-------------------------------------------------------------\n");
  printf("Starting Verify Tests.\n");
  switch(input){
  case 0:
    testInputState();
    break;
  case 1:
    testRoverState();
    break;
  case 2:
    testCommand();
    break;
  default:
    testRoverState();
    testInputState();
    testCommand();
    break;
  }

  printf("Verify Tests Complete.\n");
  printf("//-------------------------------------------------------------\n");
  return 0;
}

int testCommand(void){
  printf("//-------------------------------------------------------------\n");
  printf("Starting Command Verify Tests.\n");
  Command::verify();
  printf("Command Verify Tests Complete.\n");
  printf("//-------------------------------------------------------------\n");
  return 0;
}

int testInputState(void){
  printf("//-------------------------------------------------------------\n");
  printf("Starting InputState Verify Tests.\n");
  InputState::verify();
  printf("InputState Verify Test Tests Complete.\n");
  printf("//-------------------------------------------------------------\n");
  return 0;
}

int testRoverState(void){
  printf("//-------------------------------------------------------------\n");
  printf("Starting RoverState Verify Tests.\n");
  RoverState::verify();
  printf("RoverState Verify Tests Complete.\n");
  printf("//-------------------------------------------------------------\n");
  return 0;
}
